package bz.ziro.kanbe.controller.mng.file;

import java.util.logging.Logger;
import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;

import bz.ziro.kanbe.dao.SiteFileDao;
import bz.ziro.kanbe.model.SiteFile;

/**
 * ファイルデータ取得
 * @author Administrator
 */
public class FindController extends Controller {

    @SuppressWarnings("unused")
    private static final Logger logger = Logger.getLogger(FindController.class.getName());

    @Override
    public Navigation run() {
        //データを検索
        String keyBuf = param("fileKey");
        SiteFile file = SiteFileDao.find(Long.valueOf(keyBuf));
        //リクエストに設定
        requestScope("file",file);
        return forward("find.jsp");
    }
}
